<?php
/**
 * CreateTime: 2024/1/18 12:00
 * User:LinQ
 */

namespace App\Http\Requests\Address;

use App\Http\Requests\BasicFormRequests;

class AddressRequest  extends BasicFormRequests
{
    protected $rule =[
        'recipient_name' => 'required',
        'phone_number' => 'required',
        'city' => 'required' ,
        'state' => 'required',
        'address_line' => 'required',
        'postal_code' => 'required',
    ];

    public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
    {
        $this->message = [
            'recipient_name.required'=>trans('message.request_required',[
                'name' => trans('key.recipient_name')
            ]),
            'phone_number.required'=>trans('message.request_required',[
                'name' => trans('key.phone')
            ]),
            'city.required'=>trans('message.request_required',[
                'name' => trans('key.city')
            ]),
            'state.required'=>trans('message.request_required',[
                'name' => trans('key.state')
            ]),
            'address_line.required'=>trans('message.request_required',[
                'name' => trans('key.address_line')
            ]),
            'postal_code.required'=>trans('message.request_required',[
                'name' => trans('key.postal_code')
            ]),
        ];
        parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
    }


    protected $scene = [];
}